package com.anpy.activiti;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;


@Data
@TableName(value = "T_BILL")
//@Entity
public class BillEntity {

    //    @Id
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private String name;
    private Double money;
    //    @NotBlank(message = "address不能为空")
    private String address;
    @TableField(value = "account_id")
    private Integer accountId;
    @TableField(value = "merchant_id")
    private Integer merchantId;
    @TableField(value = "user_id")
//    @Getter(onMethod = @__(@JsonIgnore))
    private Integer userId = 1;

    //    @ListValue(values = {0,1})
    @TableField(value = "classify_id")
    private Integer classifyId;

    @TableField(value = "second_classify_id")
    private Integer secondClassifyId;

    private String remark;
    private String img;

    @JsonFormat(pattern = "yyyy/MM/dd")
    @DateTimeFormat(pattern = "yyyy/MM/dd")
    @TableField(value = "create_time")
    private String createTime;
    @TableField(value = "update_time")
    @JsonFormat(pattern = "yyyy/MM/dd")
    @DateTimeFormat(pattern = "yyyy/MM/dd")
    private String updateTime;

    @TableField("account_book_id")
    private Integer accountBookId;

    private String icon;

//    private String bankName;
//    private String merchantName;

    private Integer type;

//    public void setId(Long id) {
//        this.id = id;
//    }
//
//    public Long getId() {
//        return id;
//    }
}
